package com.kerry.configure;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.kerry.interceptor.MyInterceptor;
import com.kerry.interceptor.MyInterceptor1;

@Configuration
public class InterceptorConfigure extends WebMvcConfigurerAdapter {

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(new MyInterceptor())
				.addPathPatterns("/interceptor/*")
				.excludePathPatterns("/interceptor/exclude/*");
		
		registry.addInterceptor(new MyInterceptor1())
				.addPathPatterns("/interceptor1/*")
				.excludePathPatterns("/interceptor1/exculde/*");
	}

}
